SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 30562: SCL SORT function fails when specifying more than one SAS Data Set option on the OUT= option

DetailsAboutRate It

If you use the SORT function in SAS Component Language to sort a table to an output table by specifying the OUT= option and you specify more than one SAS data set option as in the following example,

rc=sort(dsid, 'age', '/out=myLib.sorted(label="xyz" drop=weight)'); 

the function might fail with a non-zero return code such as 219 or 253. If you use the SYSMSG function to query the associated system message for these return codes, the messages are the following respectively:

 
Invalid SORT option DROP WEIGHT)

Output data set for SORT cannot be opened.
 

To circumvent this problem, either specify just one of the SAS data set options in the SORT function or specify both options in a PROC SORT step within a SUBMIT block. Another alternative is to first sort the data to a temporary data set and then use the COPY function to create the permanent data set specifying all the SAS data set options. For example,

   rc=sort(dsid, 'age', '/out=tempsort);
   rc=copy('work.tempsort', 'myLib.sorted(label="xyz" drop=weight)'); 


Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemSAS/AFz/OS9.1 TS1M39.3 TS1M0
Microsoft® Windows® for 64-Bit Itanium-based Systems9.1 TS1M39.3 TS1M0
Microsoft Windows Server 2003 Datacenter 64-bit Edition9.1 TS1M39.3 TS1M0
Microsoft Windows Server 2003 Enterprise 64-bit Edition9.1 TS1M39.3 TS1M0
Microsoft Windows XP 64-bit Edition9.1 TS1M39.3 TS1M0
Microsoft® Windows® for x649.1 TS1M39.3 TS1M0
Microsoft Windows 2000 Advanced Server9.1 TS1M3
Microsoft Windows 2000 Datacenter Server9.1 TS1M3
Microsoft Windows 2000 Server9.1 TS1M3
Microsoft Windows 2000 Professional9.1 TS1M3
Microsoft Windows NT Workstation9.1 TS1M3
Microsoft Windows Server 2003 Datacenter Edition9.1 TS1M39.3 TS1M0
Microsoft Windows Server 2003 Enterprise Edition9.1 TS1M39.3 TS1M0
Microsoft Windows Server 2003 Standard Edition9.1 TS1M39.3 TS1M0
Microsoft Windows XP Professional9.1 TS1M39.3 TS1M0
Windows Vista9.1 TS1M39.3 TS1M0
64-bit Enabled AIX9.1 TS1M39.3 TS1M0
64-bit Enabled HP-UX9.1 TS1M39.3 TS1M0
64-bit Enabled Solaris9.1 TS1M39.3 TS1M0
HP-UX IPF9.1 TS1M39.3 TS1M0
Linux9.1 TS1M39.3 TS1M0
OpenVMS Alpha9.1 TS1M39.3 TS1M0
Solaris for x649.1 TS1M39.3 TS1M0
Tru64 UNIX9.1 TS1M39.3 TS1M0
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.